/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wwcontrolserver.sensor;

/**
 *
 * @author Michael Ferry
 */
//This uses the ifkSerial and the SensorNumber as a key
public class SensorKey {

    private int ifkSerial;
    private int SNUM;

    public SensorKey(int ifkSerial, int SNUM) {
        this.ifkSerial = ifkSerial;
        this.SNUM = SNUM;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final SensorKey other = (SensorKey) obj;
        if (this.ifkSerial != other.ifkSerial) {
            return false;
        }
        if (this.SNUM != other.SNUM) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 89 * hash + this.ifkSerial;
        hash = 89 * hash + this.SNUM;
        return hash;
    }

    public int GetIFK() {
        return ifkSerial;
    }

    public int GetSNUM() {
        return SNUM;
    }
}
